Field of the Invention
The present invention relates to a technique of processing a given image while referring to part of an image adjacent to the given image.
Description of the Related Art
Recently, there has been an active movement toward high-resolution videos such as 4K2K and 8K4K videos on televisions, liquid crystal projectors, displays, and the like. Such a video has a high pixel count and high color bit depth per image, and hence requires a very large band in the frame memory of an image processing apparatus. For this reason, methods of performing parallel processing upon segmenting an image into a plurality of regions and compressing/decompressing an image at the time of memory access have conventionally been used.
When one image is segmented into a plurality of segmented images and each segmented image is processed, a deterioration in image quality is caused by the loss of continuity of pixels on segment boundaries. For this reason, when processing segment boundaries, in addition to the above methods, there is often used a method of performing processing while referring to part (to be referred to as superimposed regions) of adjacent segmented images (Japanese Patent Laid-Open No. 2010-244184).
Japanese Patent Laid-Open No. 2010-226672 discloses a method of compressing, for each block, segmented images obtained by segmenting a 4K2K image into four regions for full HD display. If the size of each segmented image is not dividable with the size of each compressed block, a region not including a segmented image pixel (to be referred to as a padding region hereinafter) occurs in the compressed block generated at an end portion of a segmented image. When compressed blocks are generated, padding regions are generally filled with copied data (to be referred to as padding hereinafter) of blank pixels or end portion pixels. The method disclosed in Japanese Patent Laid-Open No. 2010-226672 reduces a band at the time of superimposed region readout by transferring pixels to fill a padding region from an adjacent segmented region in a blanking period during which no effective pixel is transferred.
When a given segmented image is processed by using another segmented image, the amount of image data read out for image processing may undesirably increase. Consider, for example, an image processing system which spatially segments one image, segments each segmented image into blocks (to be referred to as blocks or compressed blocks hereinafter) according to a compression processing unit with a predetermined size, and processes each segmented image. In this case, if each segmented image is not an integral multiple of the block size, it is necessary to insert padding into a block on an end portion of each segmented image. In this case, when the second segmented image is processed, padding is included in a compressed block to be read out from the first segmented image to refer to superimposed regions.
This operation will be described with reference to FIGS. 11A to 11G. FIGS. 11A to 11G are views for explaining that a compressed block read out from the first segmented image to refer to superimposed regions includes padding when the second segmented image is processed. FIG. 11A shows an image before segmentation. Referring to FIG. 11B, blocks b0000 to b0003 correspond to a first segmented image T00, and blocks b0004 to b0007 correspond to a second segmented image T01. In this case, when the first segmented image T00 is processed, the block b0004 is read out as a superimposed region together with the first segmented image T00 and the blocks b0000 to b0004 are processed to prevent a deterioration in image quality caused by the loss of the continuity of pixels on a segment boundary. Likewise, when the second segmented image 101 is processed, the blocks b0003 to b0007 are read out. Note that when the second segmented image 101 is processed, blocks of the segmented image on the right of the second segmented image 101 are also referred to. However, a description of this operation will be omitted.
When each segmented image is to be processed upon reduction, reduction processing is performed for the first segmented image T00 (the blocks b0000 to b0003) shown in FIG. 11C to obtain a first reduced segmented image T10 as shown in FIG. 11D. Subsequently, when the image data is cut out for each block to perform image processing, padding is inserted in part of a block b0013, as shown in FIG. 11E. When reduction processing and padding insertion are performed for all the segmented images, the resultant image data becomes like that shown in FIG. 11F. At the time of image processing, superimposed regions adjacent to data as described above are read out together. When a second reduced segmented region T11 (blocks b0014 to b0017) are to be read out, blocks b0012 and b0013 are read out as superimposed regions together with the blocks b0014 to b0017. As described above, when no reduction processing is performed, one block is read out as a superimposed region, as shown in FIG. 11B. In contrast to this, when reduction processing is performed, the two blocks b0012 and b0013 are readout superimposed regions.
That is, letting N(p) be the number of compressed blocks of the first segmented image, which include padding and superimposed regions which are referred to from the second segmented region, N(p) is represented by:N(p)=roundup((padding size+superimposed region size)/(compressed block size))where roundup indicates the rounding up of the value inside the parentheses to an integer. In addition, “size” is a one-dimensional size in a direction at a right angle with respect to a region boundary. On the other hand, letting N be the number of compressed blocks simply including superimposed regions to be referred to from the second segmented region, N is represented by:N=roundup(superimposed region size/compressed block size)In this case, if the relation between the two numbers N(p) and N of compressed blocks satisfies N(p)>N, adding padding will increase the number of compressed blocks to be read out to refer to superimposed regions. This leads to the problem that the band increases at the time of superimposed region readout.